#!/bin/sh

declare -a locales
((i=0))
for po in `ls *.po`
do
    LAN=${po%.po}
    mkdir $LAN
    cp -f $po $LAN/$1.po
    locales[i]=$LAN/
    ((i++))
done
mkdir pot
cp -f $1.pot pot/
locales[i]=pot/
tar cvzf $1.tgz --exclude .svn "${locales[@]}"
rm -Rf "${locales[@]}"
